﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AddFileType.aspx.cs" Inherits="FileConverter.Bas.AddFileType" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div style="margin: 10px;">
        &nbsp;&nbsp;文件类型名称：<asp:TextBox ID="TestType" runat="server" />
        &nbsp;类型：<asp:TextBox ID="Type" runat="server" Text="IQC" Width="100px"/><asp:Button ID="btnAddTestType" runat="server" Text="增加文件类型" OnClick="btnAddTestType_Click" />
        <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click"  /></br>
        &nbsp;&nbsp;描述：<asp:TextBox ID="TestTypeDesc" runat="server" />
        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;DataFormatType：<asp:TextBox ID="DataFormatType" Text="TableFormatBLL" runat="server" />
        &nbsp;&nbsp;&nbsp; 绝对值 <asp:CheckBox ID="isAbs" runat="server" /></br> 
        查找方式：<asp:DropDownList ID="DataFieldIndex" runat="server">
                <asp:ListItem Value="排序查找">排序查找</asp:ListItem>
                <asp:ListItem Value="列名查找">列名查找</asp:ListItem>
             </asp:DropDownList> 
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;头行数：<asp:TextBox ID="headIndex" runat="server"  Width="100px" ></asp:TextBox> &nbsp;&nbsp;&nbsp; 
        值行数:<asp:TextBox ID="ValueIndex" runat="server"  Width="100px" ></asp:TextBox>
    </div>

    <div>
        <asp:GridView ID="GV_bas_TestType" runat="server" AutoGenerateColumns="False"  Width="100%" PageSize="6"
            DataKeyNames="testType,type,testTypeDesc,dataFormatType,dataFieldIndex,HeadIndex,ValueIndex" 
            OnRowCancelingEdit="GridView1_RowCancelingEdit"
             OnRowDeleting="GridView1_RowDeleting" OnRowUpdating="GridView1_RowUpdating" CellPadding="4" 
            ForeColor="#333333" GridLines="None" OnRowEditing="GV_bas_TestType_RowEditing" AllowPaging="True"
             OnPageIndexChanged="GV_bas_TestType_PageIndexChanged" OnPageIndexChanging="GV_bas_TestType_PageIndexChanging"
             OnRowDataBound="GV_bas_TestType_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="testType" HeaderText="文件类型名称" ReadOnly="true" />
                <asp:BoundField DataField="type" HeaderText="类型"/>
                <asp:BoundField DataField="testTypeDesc" HeaderText="描述" />
                <asp:BoundField DataField="dataFormatType" HeaderText="DataFormatType" />
                <asp:TemplateField HeaderText="查找方式">
                    <EditItemTemplate>
                        <asp:TextBox ID="TBqueryType" runat="server" Visible="false" Height="16px" Text='<%# Bind("dataFieldIndex") %>' Width="78px"></asp:TextBox>
                        <asp:DropDownList ID="DDLqueryType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDLqueryType_SelectedIndexChanged">
                            <asp:ListItem Value="排序查找">排序查找</asp:ListItem>
                            <asp:ListItem Value="列名查找">列名查找</asp:ListItem>
                        </asp:DropDownList>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("dataFieldIndex") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CheckBoxField DataField="isAbs" HeaderText="绝对值" />
                <asp:BoundField DataField="HeadIndex" HeaderText="头行数" />
                <asp:BoundField DataField="ValueIndex" HeaderText="值行数" />
                <asp:CommandField ShowSelectButton="False" ShowEditButton="True" ShowDeleteButton="True"></asp:CommandField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>

    <div style="margin: 10px;">
        &nbsp;&nbsp;文件类型名称：<asp:TextBox ID="TestType1" runat="server" />
        &nbsp;显示名称：<asp:TextBox ID="TestParam" runat="server" /><asp:Button ID="AddTestparam" runat="server" Text="增加" OnClick="AddTestparam_Click" />
        <asp:Button ID="Button2" runat="server" Text="查询" OnClick="QueryTestParam_Click"/>
        <asp:Button ID="btnDel" runat="server" Text="删除" OnClick="btnDel_Click"/></br>
        &nbsp;&nbsp;行号：<asp:TextBox ID="seqNo" runat="server" />
        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;列名：<asp:TextBox ID="LongName" runat="server" />
        &nbsp;&nbsp;公式：<asp:TextBox ID="exp" runat="server" />
        <br />
          &nbsp;&nbsp;<a href="bas_TestParam.csv">导入模版下载</a>    
        &nbsp;&nbsp;文件：<asp:FileUpload ID="FileUpload1" runat="server" />&nbsp;
        <asp:Button ID="btnImportTestParam" runat="server" Text="批量导入" OnClick="btnImportTestParam_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;</div>
    <div>
        <asp:GridView ID="GV_bas_Testparam" runat="server" PageSize="15"
             AutoGenerateColumns="False" Width="100%" OnPageIndexChanging="GridView2_PageIndexChanging" 
            OnRowDeleting="GridView2_RowDeleting" OnRowUpdating="GridView2_RowUpdating"
             OnSelectedIndexChanging="GridView2_SelectedIndexChanging" CellPadding="4" ForeColor="#333333" 
            GridLines="None" DataKeyNames="testType,testParam,seqNo,longName,Express" 
            OnRowCancelingEdit="GV_bas_Testparam_RowCancelingEdit" OnRowEditing="GV_bas_Testparam_RowEditing" AllowPaging="True" OnPageIndexChanged="GV_bas_Testparam_PageIndexChanged" OnRowDataBound="GV_bas_Testparam_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="testType" HeaderText="文件类型名称" ReadOnly="true" />
                <asp:BoundField DataField="testParam" HeaderText="显示名称" ReadOnly="true"/>
                <asp:BoundField DataField="seqNo" HeaderText="列号" ReadOnly="true"/>
                <asp:BoundField DataField="longName" HeaderText="列名" />
                <asp:BoundField DataField="Express" HeaderText="公式" />
                <asp:CommandField ShowSelectButton="False" ShowEditButton="True" ShowDeleteButton="True"></asp:CommandField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>

</asp:Content>
